package com.muyu.danmo.mapper;

import com.muyu.danmo.domain.DanmoCommunity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 社区表Mapper接口
 *
 * @author kunzong
 * @date : 2024-11-19
 */
public interface DanmoCommunityMapper {

    /**
     * 查询社区表列表
     *
     * @param danmoCommunity 社区表实体
     * @return 社区表列表
     */
    List<DanmoCommunity> selectDanmoCommunityList(DanmoCommunity danmoCommunity);

    /**
     * 根据ID查询社区表详细信息
     *
     * @param id 社区表ID
     * @return 社区表实体
     */
    DanmoCommunity selectDanmoCommunityById(Long id);

    /**
     * 新增社区表
     *
     * @param danmoCommunity 社区表实体
     * @return 影响行数
     */
    int insertDanmoCommunity(DanmoCommunity danmoCommunity);

    /**
     * 修改社区表
     *
     * @param danmoCommunity 社区表实体
     * @return 影响行数
     */
    int updateDanmoCommunity(DanmoCommunity danmoCommunity);

    /**
     * 删除社区表
     *
     * @param ids 社区表ID数组
     * @return 影响行数
     */
    int deleteDanmoCommunityByIds(@Param("ids") Long[] ids);

    /**
     * 根据关注者ID查询关注者所关注的所有帖子
     *
     * @param followeeIdList
     * @return
     */
    List<DanmoCommunity> selectDanmoCommunityFolloweeIdList(@Param("followeeIdList") List<Long> followeeIdList);

    /**
     * 查询热门帖子(排序)
     * @param danmoCommunity
     * @return
     */
    List<DanmoCommunity> selectDanmoCommunityPopularList(DanmoCommunity danmoCommunity);

    List<DanmoCommunity> selectDanmoCommunityByIds(@Param("ids") Long[] ids);


    List<DanmoCommunity> selectDanmoCommunityMyCommunityList(DanmoCommunity danmoCommunity);

    List<DanmoCommunity> selectOtherCollectionDanmoCommunityList(DanmoCommunity danmoCommunity);

    List<DanmoCommunity> selectDanmoCommunityByIdss(@Param("ids") List<Long> ids);

    DanmoCommunity selectDanmoCommunityByIdAndUserId(@Param("id") Long id, @Param("userId") Long userId);


    List<DanmoCommunity> selectDanmoCommunityLists(DanmoCommunity danmoCommunity);
}